package cn.skyclass.events
{
	import cn.skyclass.beans.BaseFileBean;
	
	import flash.events.Event;
	
	import mx.collections.ArrayCollection;
	
	/**
	 * 提供和文件操作相关的事件
	 */
	public class FileEvent extends Event
	{
		public static const SELECT_FILE:String = "selectFile";
		public static const SELECT_FILES:String = "selectFiles";
		
		public static const UPLOAD_FILE:String = "uploadFile";
		public static const DOWNLOAD_FILE:String = "downloadFile";
		
		public static const OPEN_FILE:String = "openFile";
		public static const CLOSE_FILE:String = "closeFile";
		
		public var file:BaseFileBean;
		public var files:ArrayCollection;
		
		public function FileEvent(type:String, file:BaseFileBean=null){
			super(type);
			this.file = file;
		}	
		
		override public function clone():Event{
			var e:FileEvent = new FileEvent(this.type, this.file);
			e.files = this.files;
			return e;
		}	
	}
}